# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=drinkme
pkgver=19.acf1a14
pkgrel=1
pkgdesc='A shellcode testing harness.'
groups=('blackarch' 'blackarch-exploitation')
arch=('x86_64' 'aarch64')
url='https://github.com/emptymonkey/drinkme'
license=('custom:unknown')
depends=()
makedepends=('git')
source=("git+https://github.com/emptymonkey/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md

  rm README.md

  cp -a * "$pkgdir/usr/share/$pkgname/"
}

